﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ItemManager
{
    class CItemList
    {
        List<CItem> m_itemList;

        public CItemList()
        {

        }

        public CItem getItemByID(string id)
        {
            foreach(CItem item in m_itemList)
            {
                if(item.getID() == id)
                {
                    return item;
                }
            }

            return null;
        }


        public CItem getItemByName(string name)
        {
            foreach(CItem item in m_itemList)
            {
                if(item.getName() == name)
                {
                    return item;
                }
            }

            return null;
        }
    }
}
